<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>07-流式布局</title>
  <style>
    section {
      width: 100%;
      /* 设置最大值与最小值：不让宽度无限扩大与无限缩小 */
      margin: 0 auto;
      /* 1. 最大不能超过980像素 */
      max-width: 980px;
      /* 2. 最小不能超过320像素 */
      min-width: 320px;
    }

    section div {
      float: left;
      width: 50%;
      height: 400px;
    }

    section div:nth-child(1) {
      background-color: pink;
    }

    section div:nth-child(2) {
      background-color: skyblue;
    }
  </style>
</head>

<body>

  <section>
    <div></div>
    <div></div>
  </section>

</body>

</html>